Rewrote script in PHP to fix various errors from redis. Also faster#3
Open
aziraphale wants to merge 1 commit intorenasboy:masterfrom
Open
Rewrote script in PHP to fix various errors from redis. Also faster#3aziraphale wants to merge 1 commit intorenasboy:masterfrom
aziraphale wants to merge 1 commit intorenasboy:masterfrom
Conversation
Owner
|
hey man, its all GREAT that you fixed it, however I stop working with PHP and this script it not in use (by me anymore), feel free to fork it and apply your changes to it !! |
Author
|
That's cool, no worries :) I figure that having this pull request here may help people find my version if they have the same problems that I did. No need to merge it or anything :) |
Owner
|
Yep you are right? coolio, nice work !! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was having some problems running this script - I would get various errors back from redis that seemed to suggest that the line length specified for the data line was incorrect. This mostly/entirely happened with sessions created by phpMyAdmin - i.e. very long files, with lots of complex PHP serialization strings.
I tried to fix the bash script for a while, but there were parts where I wasn't confident about what was going on, so I rewrote the whole thing in PHP (which I figured was fine in this case, since it's a PHP-related script, so anyone wanting to run it would probably already have PHP installed). My PHP version not only migrates my ~600 sessions flawlessly, without getting stuck on the phpMyAdmin sessions, but it also runs a lot faster (I'm seeing it execute in under 1 second for ~600 sessions, while the original script took around 4-5 seconds to run).